//
//  Map.m
//  FunnyRacing
//
//  Created by vy phan on 17/03/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Map.h"


@implementation Map
-(id)init{
	self = [super init];
	if (self != nil) {
		background = [CCSprite spriteWithFile:[NSString stringWithFormat:@"%@.png", code]];
		background.position = CGPointZero;
		[self addChild:background];
	}
	return self;
}
-(id)initWithMapName:(NSString*)mapName
{
	self = [super init];
	if (self != nil) {
		code = mapName;
		background = [CCSprite spriteWithFile:[NSString stringWithFormat:@"%@.png", code]];
		background.position = CGPointZero;
		self.contentSize = CGSizeMake(1024, 768);
		[self addChild:background];
	}
	return self;
}
-(void)dealloc{
	NSLog(@"Map %@ dealloc", code);
	[super dealloc];
}
@end
